export {};
type Pick<T, K extends keyof T> = {
  [P in K]: T[P];
};
type Exclude<T, U> = T extends U ? never : T;

// 删除T中K的属性, exclude处理的属性，omit处理的对象
type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
type Omit2<T, K extends keyof T> = {
  [P in Exclude<keyof T, K>] : T[P];
};

interface Todo {
  title: string;
  description: string;
  completed: boolean;
}

type TodoPreview = Omit<Todo, "description">;

const todo: TodoPreview = {
  title: "Clean room",
  completed: false,
};

